<script type="text/javascript">
	var iconData = [ {
		value : '',
		text : '${action.getProperty('net.esj.background.message','bg.message.default')}'
	}, {
		value : 'icon-add',
		text : 'icon-add'
	}, {
		value : 'icon-edit',
		text : 'icon-edit'
	}, {
		value : 'icon-remove',
		text : 'icon-remove'
	}, {
		value : 'icon-save',
		text : 'icon-save'
	}, {
		value : 'icon-cut',
		text : 'icon-cut'
	}, {
		value : 'icon-ok',
		text : 'icon-ok'
	}, {
		value : 'icon-no',
		text : 'icon-no'
	}, {
		value : 'icon-cancel',
		text : 'icon-cancel'
	}, {
		value : 'icon-reload',
		text : 'icon-reload'
	}, {
		value : 'icon-search',
		text : 'icon-search'
	}, {
		value : 'icon-print',
		text : 'icon-print'
	}, {
		value : 'icon-help',
		text : 'icon-help'
	}, {
		value : 'icon-undo',
		text : 'icon-undo'
	}, {
		value : 'icon-redo',
		text : 'icon-redo'
	}, {
		value : 'icon-back',
		text : 'icon-back'
	}, {
		value : 'icon-sum',
		text : 'icon-sum'
	}, {
		value : 'icon-tip',
		text : 'icon-tip'
	} ];
	
	$(function() {
		$('#func_icon_combobox').combobox({
			data : iconData,
			formatter : function(v) {
				return '<span class="'+v.value+'" style="display:inline-block;vertical-align:middle;width:16px;height:16px;"></span>'+v.value+'';
			}
		});
		
		$('#func_scope_combobox').combobox({
			data:[{value:'Global',text:'Global'},{value:'ContextMenu',text:'ContextMenu'}]
		})
	});
</script>
<div>
	<form method="post" id="form_${action_id}" name="form_${action_id}" >
	<input  type="hidden" name="entity.id" id="entity.id" />
	<input  type="hidden" name="entity.model.id" id="entity.model.id" value="${model.id?default('')}" />
	<input  type="hidden" name="entity.durable" id="entity.durable" value="0" />
    <table class="form-table" cellpadding=3>
        <tr>
            <td>${action.getDatagridTitle('name')}:</td>
            <td><input id="entity.name" name="entity.name" type="text"  class="easyui-validatebox"  required="true" style="width:200px;"  /></td>
            <td colspan="2">
	            <table>
	            	<tr>
			            <td>${action.getDatagridTitle('sort')}:</td>
			            <td><input id="entity.sort" name="entity.sort" type="text" class="easyui-numberspinner" value="0" style="width:50px;" /></td>
			            <td>${action.getDatagridTitle('isMenu')}:</td>
			            <td>
			            	<input type="radio" name="entity.isMenu" value="false" checked="checked" />${action.getProperty('net.esj.background.message','bg.message.radio.no')}
			            	<input type="radio" name="entity.isMenu" value="true" />${action.getProperty('net.esj.background.message','bg.message.radio.yes')}
			            </td>
	            	</tr>
	            </table>
            </td>
        </tr>
        <tr>
            <td>${action.getDatagridTitle('icon')}:</td>
            <td><input class="easyui-combobox" style="width:200px;" id="func_icon_combobox" name="entity.icon" >
			</td>
            <td>${action.getDatagridTitle('parent')}:</td>
            <td><input class="easyui-combotree"  id="entity.parent.id" name="entity.parent.id" data-options="url:'${request.contextPath}${namespace?default('')}/mp/auth/func-datagrid.json?model.id=${model.id?default('')}'" style="width:200px;"></td>
        </tr>
        <tr>
            <td>${action.getDatagridTitle('url')}:</td>
            <td colspan="3" ><input id="entity.url" name="entity.url" type="text" class="easyui-validatebox" style="width:480px;" /></td>
        </tr>
        <tr>
            <td>${action.getDatagridTitle('operations')}:</td>
            <td colspan="3">
            	<textarea style="height:150px;width:480px;resize: none;" id="entity.operations" name="entity.operations" ></textarea>
            </td>
        </tr>
        <tr>
            <td>${action.getDatagridTitle('disabled')}:</td>
            <td>
            	<input type="radio" name="entity.disabled" value="false" checked="checked" />${action.getProperty('net.esj.background.message','bg.message.radio.no')}
			    <input type="radio" name="entity.disabled" value="true" />${action.getProperty('net.esj.background.message','bg.message.radio.yes')}
            </td>
            <td>${action.getDatagridTitle('priority')}:</td>
            <td>
            	<input id="entity.priority" name="entity.priority" type="text" class="easyui-numberspinner" value="0" style="width:50px;" />
            </td>
        </tr>
        <tr>
            <td>${action.getDatagridTitle('isOper')}:</td>
            <td>
            	<input type="radio" name="entity.isOper" value="false" checked="checked" />${action.getProperty('net.esj.background.message','bg.message.radio.no')}
			    <input type="radio" name="entity.isOper" value="true" />${action.getProperty('net.esj.background.message','bg.message.radio.yes')}
            </td>
            <td>${action.getDatagridTitle('scope')}:</td>
            <td>
            	<input class="easyui-combobox" style="width:200px;" id="func_scope_combobox" name="entity.scope" >
            </td>
        </tr>
        <tr>
            <td>${action.getDatagridTitle('define')}:</td>
            <td colspan="3">
            	<textarea style="height:150px;width:480px;" id="entity.define" name="entity.define" ></textarea>
            </td>
        </tr>
        <tr>
            <td>${action.getDatagridTitle('defineCheck')}:</td>
            <td colspan="3">
            	<textarea style="height:150px;width:480px;" id="entity.defineCheck" name="entity.defineCheck" ></textarea>
            </td>
        </tr>
    </table>
	</form>
</div>
